home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_368 / graphicspak / graphics_pak.doc < prev    next >
Text File  |  1992-05-06  |  11KB  |  424 lines

  1. TABLE OF CONTENTS
  2.  
  3. graphics_pak/AllocBitMap
  4. graphics_pak/CloseLibraries
  5. graphics_pak/CopyBitMap
  6. graphics_pak/DrawBitMap
  7. graphics_pak/DrawBox
  8. graphics_pak/DrawLine
  9. graphics_pak/DrawPixel
  10. graphics_pak/FillBox
  11. graphics_pak/FreeBitMap
  12. graphics_pak/MoveBitMap
  13. graphics_pak/OpenLibraries
  14. graphics_pak/WriteText
  15.  
  16.  
  17. graphics_pak/AllocBitMap                             graphics_pak/AllocBitMap
  18.  
  19.    NAME
  20.       AllocBitMap - allocate a BitMap structure and memory
  21.  
  22.    SYNOPSIS
  23.       bitmap = AllocBitMap(width, height, depth, flags);
  24.  
  25.    PROTOTYPE
  26.       struct BitMap *AllocBitMap(USHORT, USHORT, UBYTE, UBYTE);
  27.  
  28.    FUNCTION
  29.       AllocBitMap will attempt to allocate memory for a BitMap structure,
  30.       plus enough CHIP memory to hold an image of the desired size and
  31.       depth. It will then initialize the BitMap and return a pointer to it.
  32.  
  33.    INPUTS
  34.       width  -- width of the BitMap in pixels
  35.       height -- height of the BitMap in pixels
  36.       depth  -- depth of the BitMap in planes
  37.       flags  -- flag bits: FASTMEM (allocate the bitmap memory with FAST
  38.                 memory),   CHIPMEM (default - use CHIP memory)
  39.  
  40.    RETURNS
  41.       If all memory is successfully allocated, returns a pointer to the
  42.       initialized BitMap structure. If not, returns NULL.
  43.  
  44.    BUGS
  45.       If the FASTMEM flag is used, the custom graphics hardware will be
  46.       unable to display the imagery. The usefulness of this flag is only
  47.       if you plan to copy the image data (using a non-blitter copy, such as
  48.       movmem()) down into CHIP memory before displaying it.
  49.  
  50.    SEE ALSO
  51.       FreeBitMap()
  52.       CopyBitMap(), DrawBitMap(), MoveBitMap()
  53.  
  54.  
  55. graphics_pak/CloseLibraries()                   graphics_pak/CloseLibraries()
  56.  
  57.    NAME
  58.       CloseLibraries - close any libraries opened with OpenLibraries()
  59.  
  60.    SYNOPSIS
  61.       CloseLibraries();
  62.  
  63.    PROTOTYPE
  64.       void CloseLibraries(void);
  65.  
  66.    FUNCTION
  67.       CloseLibraries simply closes any libraries that were opened
  68.       successfully with the OpenLibraries() function. The graphics_pak keeps
  69.       track of which libraries were opened with a local variable, and uses
  70.       this is the close process.
  71.  
  72.    INPUTS
  73.       None.
  74.  
  75.    RETURNS
  76.       None.
  77.  
  78.    BUGS
  79.       None.
  80.  
  81.    SEE ALSO
  82.       OpenLibraries()
  83.  
  84.  
  85. graphics_pak/CopyBitMap                               graphics_pak/CopyBitMap
  86.  
  87.    NAME
  88.       CopyBitMap - copy a rectangle from one BitMap to another
  89.  
  90.    SYNOPSIS
  91.       CopyBitMap(srcbitmap, x, y, width, height, destbitmap);
  92.  
  93.    PROTOTYPE
  94.       void CopyBitMap(struct BitMap *, int, int, int, int, struct BitMap *);
  95.  
  96.    FUNCTION
  97.       CopyBitMap copies the specified rectangle from the source BitMap at the
  98.       specified offset into the destination BitMap at offset 0, 0.
  99.       Does not check for BitMap boundaries. Make sure you don't give
  100.       locations outside of the source/destination BitMaps. Make sure the
  101.       destination is large enough for the copied rectangle.
  102.  
  103.    INPUTS
  104.       srcbitmap  -- pointer to the source BitMap
  105.       x          -- upper-left x coordinate of rectangle to copy
  106.       y          -- upper-left y coordinate of rectangle to copy
  107.       width      -- width of rectangle to copy (in pixels)
  108.       height     -- height of rectangle to copy (in pixels)
  109.       destbitmap -- pointer to the destination BitMap
  110.  
  111.    RETURNS
  112.       None.
  113.  
  114.    BUGS
  115.       None.
  116.  
  117.    SEE ALSO
  118.       DrawBitMap(), MoveBitMap()
  119.  
  120.  
  121. graphics_pak/DrawBitMap                               graphics_pak/DrawBitMap
  122.  
  123.    NAME
  124.       DrawBitMap - draw a BitMap into another BitMap
  125.  
  126.    SYNOPSIS
  127.       DrawBitMap(srcbitmap, x, y, w, h, destbitmap);
  128.  
  129.    PROTOTYPE
  130.       void DrawBitMap(struct BitMap *, int, int, int, int, struct BitMap *);
  131.  
  132.    FUNCTION
  133.       DrawBitMap draws a BitMap from offset 0, 0, into another BitMap at the
  134.       specified offset.
  135.       Does not check for BitMap boundaries. Make sure you don't give
  136.       locations outside of the source/destination BitMaps. Make sure the
  137.       destination is large enough for the copied rectangle.
  138.  
  139.    INPUTS
  140.       srcbitmap  -- pointer to the source BitMap
  141.       x          -- upper-left x coordinate of place to draw the BitMap
  142.       y          -- upper-left y coordinate of place to draw the BitMap
  143.       width      -- width of source BitMap (in pixels)
  144.       height     -- height of source BitMap (in pixels)
  145.       destbitmap -- pointer to the destination BitMap
  146.  
  147.    RETURNS
  148.       None.
  149.  
  150.    BUGS
  151.       None.
  152.  
  153.    SEE ALSO
  154.       CopyBitMap(), MoveBitMap()
  155.  
  156.  
  157. graphics_pak/DrawBox                                     graphics_pak/DrawBox
  158.  
  159.    NAME
  160.       DrawBox - draws a rectangular box
  161.  
  162.    SYNOPSIS
  163.       DrawBox(rastport, x, y, width, height, color);
  164.  
  165.    PROTOTYPE
  166.       void DrawBox(struct RastPort *, int, int, int, int, int);
  167.  
  168.    FUNCTION
  169.       DrawBox draws a rectangular box of the desired size and color.
  170.  
  171.    INPUTS
  172.       rastport -- pointer to the RastPort to draw the box into
  173.       x        -- upper-left x-coordinate of box
  174.       y        -- upper-left y-coordinate of box
  175.       width    -- width of the box (in pixels)
  176.       height   -- width of the box (in pixels)
  177.       color    -- color of the box
  178.  
  179.    RETURNS
  180.       None.
  181.  
  182.    BUGS
  183.       None.
  184.  
  185.    SEE ALSO
  186.       FillBox()
  187.  
  188.  
  189. graphics_pak/DrawLine                                   graphics_pak/DrawLine
  190.  
  191.    NAME
  192.       DrawLine - draws a line
  193.  
  194.    SYNOPSIS
  195.       DrawLine(rastport, x1, y1, x2, y2, color);
  196.  
  197.    PROTOTYPE
  198.       void DrawLine(struct RastPort *, int, int, int, int, int);
  199.  
  200.    FUNCTION
  201.       DrawLine draws a colored line from one point to another in the
  202.       specified RastPort.
  203.  
  204.    INPUTS
  205.       rastport -- pointer to the RastPort to draw the line into
  206.       x1       -- x-coordinate of one end of the line
  207.       y1       -- y-coordinate of one end of the line
  208.       x2       -- x-coordinate of the other end of the line
  209.       y2       -- y-coordinate of the other end of the line
  210.       color    -- color of the line
  211.  
  212.    RETURNS
  213.       None.
  214.  
  215.    BUGS
  216.       None.
  217.  
  218.    SEE ALSO
  219.       DrawPixel(), DrawBox()
  220.  
  221.  
  222. graphics_pak/DrawPixel                                 graphics_pak/DrawPixel
  223.  
  224.    NAME
  225.       DrawPixel - set a pixel
  226.  
  227.    SYNOPSIS
  228.       DrawPixel(rastport, x, y, color);
  229.  
  230.    PROTOTYPE
  231.       void DrawPixel(struct RastPort *, int, int, int);
  232.  
  233.    FUNCTION
  234.       DrawPixel sets the specified pixel in the specified RastPort to the
  235.       specified color.
  236.  
  237.    INPUTS
  238.       rastport -- pointer to the RastPort to affect
  239.       x        -- x-coordinate of pixel
  240.       y        -- y-coordinate of pixel
  241.       color    -- color to draw the pixel
  242.  
  243.    RETURNS
  244.       None.
  245.  
  246.    BUGS
  247.       None.
  248.  
  249.    SEE ALSO
  250.       DrawLine(), DrawBox()
  251.  
  252.  
  253. graphics_pak/FillBox                                     graphics_pak/FillBox
  254.  
  255.    NAME
  256.       FillBox - draws a filled rectangle
  257.  
  258.    SYNOPSIS
  259.       FillBox(rastport, x, y, width, height, color);
  260.  
  261.    PROTOTYPE
  262.       void FillBox(struct RastPort *, int, int, int, int, int);
  263.  
  264.    FUNCTION
  265.       FillBox draws a filled rectangle of the desired size and color.
  266.  
  267.    INPUTS
  268.       rastport -- pointer to the RastPort to draw the rectangle into
  269.       x        -- upper-left x-coordinate of rectangle
  270.       y        -- upper-left y-coordinate of rectangle
  271.       width    -- width of the rectangle (in pixels)
  272.       height   -- width of the rectangle (in pixels)
  273.       color    -- color of the filled rectangle
  274.  
  275.    RETURNS
  276.       None.
  277.  
  278.    BUGS
  279.       None.
  280.  
  281.    SEE ALSO
  282.       DrawBox()
  283.  
  284.  
  285. graphics_pak/FreeBitMap                               graphics_pak/FreeBitMap
  286.  
  287.    NAME
  288.       FreeBitMap - free memory allocate via AllocBitMap()
  289.  
  290.    SYNOPSIS
  291.       FreeBitMap(bitmap);
  292.  
  293.    PROTOTYPE
  294.       void FreeBitMap(struct BitMap *);
  295.  
  296.    FUNCTION
  297.       FreeBitMap deallocates the image and structure memory allocate with
  298.       the AllocBitMap() function.
  299.  
  300.    INPUTS
  301.       bitmap -- pointer to the BitMap to free
  302.  
  303.    RETURNS
  304.       None.
  305.  
  306.    BUGS
  307.       None.
  308.  
  309.    SEE ALSO
  310.       AllocBitMap()
  311.  
  312.  
  313. graphics_pak/MoveBitMap                               graphics_pak/MoveBitMap
  314.  
  315.    NAME
  316.       MoveBitMap - copy a rectangle from one BitMap to another
  317.  
  318.    SYNOPSIS
  319.       MoveBitMap(srcbitmap, x, y, width, height, destbitmap, dx, dy);
  320.  
  321.    PROTOTYPE
  322.       void MoveBitMap(struct BitMap *, int, int, int, int, struct BitMap *,
  323.                       int, int);
  324.  
  325.    FUNCTION
  326.       MoveBitMap copies the specified rectangle from the source BitMap at the
  327.       specified offset into the destination BitMap at the specified dest-
  328.       ination offset.
  329.       Does not check for BitMap boundaries. Make sure you don't give
  330.       locations outside of the source/destination BitMaps. Make sure the
  331.       destination is large enough for the copied rectangle.
  332.  
  333.    INPUTS
  334.       srcbitmap  -- pointer to the source BitMap
  335.       x          -- upper-left x coordinate of rectangle to copy
  336.       y          -- upper-left y coordinate of rectangle to copy
  337.       width      -- width of rectangle to copy (in pixels)
  338.       height     -- height of rectangle to copy (in pixels)
  339.       destbitmap -- pointer to the destination BitMap
  340.       dx         -- upper-left x coordinate of destination position
  341.       dy         -- upper-left y coordinate of destination position
  342.  
  343.    RETURNS
  344.       None.
  345.  
  346.    BUGS
  347.       None.
  348.  
  349.    SEE ALSO
  350.       CopyBitMap(), DrawBitMap()
  351.  
  352.  
  353. graphics_pak/OpenLibraries                         graphics_pak/OpenLibraries
  354.  
  355.    NAME
  356.       OpenLibraries - open ROM/DISK libraries
  357.  
  358.    SYNOPSIS
  359.       success = OpenLibraries(libs);
  360.  
  361.    PROTOTYPE
  362.       int OpenLibraries(UWORD);
  363.  
  364.    FUNCTION
  365.       OpenLibraries opens a set of libraries specified as bits in the libs
  366.       variable. The libraries opened with OpenLibraries are maintained in
  367.       a module-local variable, and is used via CloseLibraries(). Also, if
  368.       any of the specified libraries is unavailable, that bit is not set in
  369.       the internal open libraries variable.
  370.  
  371.    INPUTS
  372.       libs -- UWORD containing the bits of the libraries to be opened, as
  373.               defined below:
  374.  
  375.               Bit Definition     Library
  376.  
  377.               GFXBASE            GfxBase
  378.               INTUITIONBASE      IntuitionBase
  379.               LAYERSBASE         LayersBase
  380.               DISKFONTBASE       DiskFontBase
  381.               MATHTRANSBASE      MathTransBase
  382.  
  383.    RETURNS
  384.       OpenLibraries returns an int with the bits of opened libraries set.
  385.  
  386.    BUGS
  387.       None.
  388.  
  389.    SEE ALSO
  390.       CloseLibraries()
  391.  
  392.  
  393. graphics_pak/WriteText                                 graphics_pak/WriteText
  394.  
  395.    NAME
  396.       WriteText - draws text in the specified RastPort
  397.  
  398.    SYNOPSIS
  399.       WriteText(rastport, x, y, text, color);
  400.  
  401.    PROTOTYPE
  402.       void WriteText(struct RastPort *, long, long, char *, long);
  403.  
  404.    FUNCTION
  405.       WriteText draws the specified text into the specified RastPort in the
  406.       specified location and color. The text is in the size and style of the
  407.       specified RastPort.
  408.  
  409.    INPUTS
  410.       rastport -- pointer to the RastPort to render the text into
  411.       x        -- upper-left x coordinate of the text
  412.       y        -- upper-left y coordinate of BASELINE of the text
  413.       text     -- pointer to the NULL-terminated text string
  414.       color    -- color of the text
  415.  
  416.    RETURNS
  417.       None.
  418.  
  419.    BUGS
  420.       None.
  421.  
  422.    SEE ALSO
  423.  
  424.